<?php include('./templete/public/head.php')?>

<body class="mbHeight">
<!--底部导航-->
<?php include('./templete/public/foot.php')?>
<!--个人中心-->
<div class="integral-main">

    <div class="main-content">
        <div class="c-top">
            <img src="<?php echo session('user_info')['avatar']?>" class="head-img"  onclick="update_info()"/>
            <script>
                function update_info() {
                    $.ajax({
                        url:"<?php echo url('update_info')?>",
                        success:function (data) {
                            layer.msg(data.msg);
                            setTimeout(function () {
                                location.reload();
                            },1000)
                        }
                    })
                }
            </script>
            <div class="top-text">
                <p class="name"><?php echo session('user_info')['name']?></p>
                <span>积分:<?php echo $user_info['integral']?></span>
                <span class="line">|</span>
                <span>经验值:<?php echo $user_info['exp']?></span>
            </div>
            <div class="top-btn">
                <a href="<?php echo url('user/sign')?>" target="_blank">去签到</a>
            </div>
        </div>
        <div class="c-list">
            <ul class="comm-table-view">
                <li class="table-view-cell">
                    <a href="<?php echo url('mytopic')?>">
                        <span>我的主题</span>
                        <span class="fr"><i class="iconfont icon-youjiantou"></i></span>
                    </a>
                </li>
                <li class="table-view-cell">
                    <a href="<?php echo url('mycomment')?>">
                        <span>我的回复</span>
                        <span class="fr"><i class="iconfont icon-youjiantou"></i></span>
                    </a>
                </li>
                <li class="table-view-cell">
                    <a href="<?php echo url('myappreciate')?>">
                        <span>我的点赞</span>
                        <span class="fr"><i class="iconfont icon-youjiantou"></i></span>
                    </a>
                </li>
                <li class="table-view-cell">
                    <a href="<?php echo url('mycollect')?>">
                        <span>我的收藏</span>
                        <span class="fr"><i class="iconfont icon-youjiantou"></i></span>
                    </a>
                </li>
                <?php if($manager==1){?>
                <li class="table-view-cell">
                    <a href="<?php echo url('reward/index')?>">
                        <span>我的红包审核</span>
                        <span class="fr"><i class="iconfont icon-youjiantou"></i></span>
                    </a>
                </li>
                <?php }?>
                <li class="table-view-cell">
                    <a href="<?php echo url('message')?>" target="_blank">
                        <span>我的消息</span>
                        <span class="fr">
                             <?php if($unread_count>0){?>
                            <em class="news-circle"><?php echo $unread_count?></em>
                             <?php }?>
                            <i class="iconfont icon-youjiantou"></i>
                        </span>
                    </a>
                </li>
				<li class="table-view-cell">
                    <a href="<?php echo url('updatePassword')?>">
                        <span>管理工资条密码</span>
                        <span class="fr"><i class="iconfont icon-youjiantou"></i></span>
                    </a>
                </li>
            </ul>
        </div>
    </div>

</div>

</body>

</html>